From 68f44c4e90f8fdd65a9d1f7c47b4637411628a91 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Wilmet?= Date: Sat, 13 Jul 2013 21:07:08 +0200 Subject: [PATCH] GtkSearchEntry: fix search_entry_clear_cb() When the icon-release signal is emitted on a GtkSearchEntry, the contents is now cleared only if it's for the secondary icon. The primary icon can be used for another purpose. https://bugzilla.gnome.org/show_bug.cgi?id=704164 --- gtk/gtksearchentry.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gtk/gtksearchentry.c b/gtk/gtksearchentry.c index 6179dc04d9..c785a08446 100644 --- a/gtk/gtksearchentry.c +++ b/gtk/gtksearchentry.c @@ -83,10 +83,12 @@ gtk_search_entry_class_init (GtkSearchEntryClass *klass) } static void -search_entry_clear_cb (GtkEntry *entry, - gpointer user_data) +search_entry_clear_cb (GtkEntry *entry, + GtkEntryIconPosition icon_pos, + gpointer user_data) { - gtk_entry_set_text (entry, ""); + if (icon_pos == GTK_ENTRY_ICON_SECONDARY) + gtk_entry_set_text (entry, ""); } static gboolean -- 2.30.2